package cn.cool.middleware.biz_exception_retry.infra.mysql;

import cn.cool.middleware.biz_exception_retry.infra.mysql.po.BizExceptionRetryRecordPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BizExceptionRetryRecordMapper {

    int insert(BizExceptionRetryRecordPO record);

    List<BizExceptionRetryRecordPO> listExceptionRetryRecords(@Param("lastExceptionId") long lastExceptionId, @Param("exceptionModule") String exceptionModule, @Param("pageSize") int pageSize);

    int updateRecordStatus2Processing(@Param("bizExceptionRetryId") Long bizExceptionRetryId, @Param("status") Integer status);

    int incrBizExceptionRetryDealNumber(@Param("retryId") Long retryId);

    int updateBizExceptionRetryRecordStatus(BizExceptionRetryRecordPO recordPO);
}
